package org.example.page194.service.impl;

import org.example.page194.dao.ProductDAO;
import org.example.page194.entity.Product;
import org.example.page194.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("productService")
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductDAO productDAO;

    @Override
    public List<Product> getProductList() {
        return productDAO.getProductList();
    }
    @Override
    public Product getProductById(Integer productId){
        return productDAO.getProductById(productId);
    }
}
